package com.note.simpleshop.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

/***
 *@ClaseName:TbGivedCoupon
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/3/6 0006 15:46
 */
@Entity
@Table(name = "tb_gived_coupon", schema = "simpleshop", catalog = "")
public class TbGivedCoupon {
    private String id;
    private String couponId;
    private Date giveTime;
    private String userId;
    private Date eifTime;
    private Date expireTime;
    @Basic
    @Column(name = "eif_time")
    public Date getEifTime() {
        return eifTime;
    }

    public void setEifTime(Date eifTime) {
        this.eifTime = eifTime;
    }
    @Basic
    @Column(name = "expire_time")
    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "coupon_id")
    public String getCouponId() {
        return couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    @Basic
    @Column(name = "give_time")
    public Date getGiveTime() {
        return giveTime;
    }

    public void setGiveTime(Date giveTime) {
        this.giveTime = giveTime;
    }

    @Basic
    @Column(name = "user_id")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbGivedCoupon that = (TbGivedCoupon) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(couponId, that.couponId) &&
                Objects.equals(giveTime, that.giveTime) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(eifTime, that.eifTime) &&
                Objects.equals(expireTime, that.expireTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, couponId, giveTime, userId,eifTime,expireTime);
    }
}
